﻿using System;
using YJKExcelFormTool.Utilities;

namespace YJKExcelFormTool.Analyser
{
	public class ExcelRange
	{
		public ExcelRange(int row, int col, int rowSize, int colSize, string text, string interiorColor, bool isMerge, string fontColor, string format, string key)
		{
			this._row = row;
			this._col = col;
			this._text = text;
			if (col > 26)
			{
				int num = col % 26;
				this._startCell = "A" + Common.AscII2Chr(num + 64) + row.ToString();
			}
			else
			{
				this._startCell = Common.AscII2Chr(col + 64) + row.ToString();
			}
			int num2 = col + colSize - 1;
			if (num2 > 26)
			{
				int num3 = num2 % 26;
				this._endCell = "A" + Common.AscII2Chr(num3 + 64) + (row + rowSize - 1).ToString();
			}
			else
			{
				this._endCell = Common.AscII2Chr(num2 + 64) + (row + rowSize - 1).ToString();
			}
			this._interiorColor = interiorColor;
			this._isMerge = isMerge;
			this._fontColor = fontColor;
			this._format = format;
			this._key = key;
		}

		public ExcelRange()
		{
		}

		public int Row
		{
			get
			{
				return this._row;
			}
			set
			{
				this._row = value;
			}
		}

		public int Col
		{
			get
			{
				return this._col;
			}
			set
			{
				this._col = value;
			}
		}

		public string Text
		{
			get
			{
				return this._text;
			}
			set
			{
				this._text = value;
			}
		}

		public string StartCell
		{
			get
			{
				return this._startCell;
			}
			set
			{
				this._startCell = value;
			}
		}

		public string EndCell
		{
			get
			{
				return this._endCell;
			}
			set
			{
				this._endCell = value;
			}
		}

		public string InteriorColor
		{
			get
			{
				return this._interiorColor;
			}
			set
			{
				this._interiorColor = value;
			}
		}

		public bool IsMerge
		{
			get
			{
				return this._isMerge;
			}
			set
			{
				this._isMerge = value;
			}
		}

		public string FontColor
		{
			get
			{
				return this._fontColor;
			}
			set
			{
				this._fontColor = value;
			}
		}

		public string Formart
		{
			get
			{
				return this._format;
			}
			set
			{
				this._format = value;
			}
		}

		public string Key
		{
			get
			{
				return this._key;
			}
			set
			{
				this._key = value;
			}
		}

		private int _row;

		private int _col;

		private string _text = string.Empty;

		private string _startCell = string.Empty;

		private string _endCell = string.Empty;

		private string _interiorColor = string.Empty;

		private bool _isMerge;

		private string _fontColor = string.Empty;

		private string _format = string.Empty;

		private string _key = string.Empty;
	}
}
